<template>
  <t-image-viewer v-if="!store.isMobileType" v-model:visible="ImgVisible" :images="[urls + props.info.value]">
  </t-image-viewer>
  <van-image-preview :show-index="false" v-else v-model:show="ImgVisible" :images="[urls + props.info.value]">
  </van-image-preview>
  <div class="outline-parent jy-style-height">
    <div class="flex-box border-hover-style">
      <div class="Showroom-parent" v-if="props.info.digitalShowroom">
        <digitalShowroomInfo :url="props.info.digitalShowroom" :id="props.info.id" />
      </div>
      <img class="outline-parent-bg" :src="publicUrls + 'free/style17/Level2outlineStyle2.webp'" alt="" />
      <div class="outline">
        <div class="outline-content">
          <div class="content-box-right">
            {{ props.info.text }}
          </div>
          <img :src="publicUrls + 'free/style17/Level2outlineStyle2Line.webp'" alt="" class="titleLine" />
          <p class="outline-subTitle" v-if="props.info.subTitle">
            {{ props.info.subTitle }}
          </p>
          <div class="cover" v-if="props.info.value" :class="!props.info.remarks && 'cover-no'">
            <img
              class="coverImg"
              @click="ImgVisible = true"
              :src="urls + props.info.value + '?imageView2/3/format/webp'"
              alt=""
            />
          </div>
          <TextMax
            v-if="props.domShow"
            :data="props.info.remarks"
            :title="props.info.text"
            :infoData="props.info"
            :row="props.info.value ? 3 : 10"
          ></TextMax>
        </div>
      </div>
    </div>
    <!-- <img class="shadow" :src="publicUrls + 'free/style4/firstLevelOutline2Shadow.png'" alt="" /> -->
  </div>
</template> 

<script lang="ts">
export default defineComponent({
  name: 'free17Style2',
});
</script>

<script setup lang="ts">
import { publicUrls, textType } from '@/utils/minxin';
import digitalShowroomInfo from '@/freeComponents/unitdigitalShowroom/style17.vue';
import { urls } from '@/utils/request/upload';
import TextMax from '@/freeComponents/textMode/TextMax.vue';
import { defineComponent, ref } from 'vue';
import { useProjectStore } from '@/store';
const store = useProjectStore();

const ImgVisible = ref(false);

const props = defineProps({
  info: {
    type: Object,
  },
  domShow: {
    type: Boolean,
  },
});

// 跳转全景链接
const open = (url: any) => {
  if (url) {
    window.open(url, '_blank');
  }
};
</script>

<style scoped lang="less">
.outline-parent {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  margin-left: 80px;
  margin-right: 90px;
  .shadow {
    width: 660px;
    height: 234px;
    position: absolute;
    bottom: 0;
    left: 0;
  }
}
.Showroom-parent {
  position: absolute;
  top: 52px;
  left: 47px;
  z-index: 21;
}
.flex-box {
  width: 447px;
  height: 774px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.outline-parent-bg {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
}
.outline {
  z-index: 20;
  width: 100%;
  height: 100%;
  padding: 180px 100px 145px 73px;
}
.outline-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 100%;
  height: 100%;
  position: relative;
}

.content-box-right {
  color: #7f1a10;
  text-align: center;
  font-family: 'SJxingkai-C';
  font-size: 24px;
  line-height: 30px;
  margin-bottom: 6px;
}
.titleLine {
  width: 100%;
  height: 17px;
  object-fit: contain;
  margin-bottom: 10px;
}

.outline-subTitle {
  width: 100%;
  color: rgba(116, 22, 21, 0.8);
  text-align: center;
  font-family: 'PingFang SC';
  font-size: 18px;
  line-height: 24px;
  text-align: center;
  margin-bottom: 10px;
  opacity: 0.8;
}
.cover {
  display: flex;
  align-items: center;
  width: 100%;
  flex: 1;
  background: linear-gradient(180deg, #fed68100, #fed681b2);
  backdrop-filter: blur(4px);
  box-shadow: 4px 4px 4px 0px rgba(45, 2, 0, 0.06);
  position: relative;
  margin-bottom: 10px;
  padding: 2px;
  overflow: hidden;
  &:hover img {
    transform: scale(1.2);
  }
  .coverImg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f2deb7;
    transition: all 0.3s ease;
  }
}

::v-deep .van-text-ellipsis {
  text-align: justify;
  font-family: PingFang SC !important;
  font-size: 16px !important;
  line-height: 30px !important;
  color: rgba(116, 22, 21, 0.8) !important;
}
::v-deep .van-text-ellipsis__action::before {
  color: rgba(116, 22, 21, 1) !important;
  font-weight: 600 !important;
  font-family: 'PingFangSC';
}
</style>